#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import os
import django

# 设置Django环境
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'wealth_backend.settings_mysql')
django.setup()

from data_service.models import FundInfoDetail

print(f'FundInfoDetail表中的记录数: {FundInfoDetail.objects.count()}')
print('最新的3条记录:')
for record in FundInfoDetail.objects.all()[:3]:
    print(f'基金代码: {record.fund_code}, 基金名称: {record.fund_name}, 基金类型: {record.fund_type}')